package com.hry.store.service;

import com.hry.store.common.BuyerCart;
import com.hry.store.pojo.CartItem;

import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;

public interface CartService {
    void addItemToCookie(BuyerCart buyerCart, HttpServletResponse response);

    int addItemsByEmail(BuyerCart buyerCart, String userEmail);

    List selectCartItemByEmail(String userEmail);

    int deleteFromMysql(Integer productId, String productName, BigDecimal productPrice, Integer versionId, String colorName, String userEmail);

    void updateNewCount(Integer productId, String productName, BigDecimal productPrice, Integer versionId, String colorName, Integer quantity, String userEmail);

    int checked(Integer productId, String productName, BigDecimal productPrice, Integer versionId, String colorName, Integer checked, String userEmail);

    List<CartItem> findByEmail(String userEmail);
}
